<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/addgame.css">
        <script src="${pageContext.request.contextPath}/js/addgame.js"></script>
        <script>
            var flag = '${flag}'
            if (flag == '1') {
                alert('添加成功');
            } else if (flag == '2') {
                alert('添加失败');
            } else if (flag == '3') {
                alert('游戏存在');
            }
        </script>
        <div class="addgame">
            <form action="addgame?action=add" method="post">
                <h1>添加游戏</h1>
                <table>
                    <tr>
                        <th>游戏名:</th>
                        <td><input autocomplete="off" type="text" name="gamename" class="gamename"></td>
                    </tr>
                    <tr>
                        <th>发行商:</th>
                        <td><input autocomplete="off" type="text" name="publisher" class="publisher"></td>
                    </tr>
                    <tr>
                        <th>发行日期:</th>
                        <td><input autocomplete="off" type="date" name="pubdate" class="pubdate"></td>
                    </tr>
                    <tr>
                        <th>简介:</th>
                        <td><textarea name="introduce" class="introduce"></textarea></td>
                    </tr>
                    <tr>
                        <th>游戏类型:</th>
                        <td><input autocomplete="off" type="text" name="type" class="type"></td>
                    </tr>
                </table>
                <span class="error"></span>
                <div class="button">
                    <input type="button" value="提交"> <input type="reset" value="重置">
                </div>
            </form>
        </div>